package com.youlu.campus.admin.user.controller;

import com.youlu.campus.entity.VO.req.WechatMiniUserQueryReq;
import com.youlu.campus.entity.WechatMiniUserPO;
import com.youlu.campus.service.visitor.WechatMiniUserService;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WechatMiniUserController {


    @Autowired
    private WechatMiniUserService wechatMiniUserService;


    /**
     * 小程序佣
     * @param
     * @return
     */
    @PostMapping("/user/mini/list")
    public  QResult list(@RequestBody WechatMiniUserQueryReq req){
        return QResult.success(wechatMiniUserService.list(req));
    }

    /**
     * 小程序修改用户
     * @param
     * @return
     */
    @PostMapping("/user/mini/update")
    public  QResult list(@RequestBody WechatMiniUserPO updateUser){
        wechatMiniUserService.updateUserInfo(updateUser);
        return QResult.success(null);
    }

    /**
     * 小程序用户导出
     * @param
     * @return
     */
    @PostMapping("/user/mini/export")
    public  QResult export(@RequestBody WechatMiniUserQueryReq req){
        wechatMiniUserService.export(req);
        return QResult.success(null);
    }


}
